树莓派调整 swap 交换分区大小


1.修改 dphys-swapfile
sudo nano /etc/dphys-swapfile
树莓派默认的 Swap 参数为 100MB
可将值修改为 1024(1GB)

2.重启 dphys-swapfile 使其生效
依次输入以下命令:
sudo /etc/init.d/dphys-swapfile stop
sudo /etc/init.d/dphys-swapfile start